package com.example.fitnessservice.module.dao.usermapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author feng
 * @version 1.0
 * @&#064;description: TODO
 * @&#064;date 2022/11/24 20:59
 */
@Mapper
public interface UserBalanceMapper {
    @Update("update user_info set balance=balance-#{money} where id=#{userId}")
    Integer userSpend(@Param("money")Double money,@Param("userId")Integer userId );
    @Update("update user_info set balance=balance + #{money} where id=#{userId}")
    Integer userReturn(@Param("money")Double money,@Param("userId")Integer userId );
}
